<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('统计分析')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">


        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:deptDtoList:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:deptDtoList:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<th:block th:include="include :: footer" />
<script th:inline="javascript">

    var removeFlag = [[${@permission.hasPermi('system:deptDtoList:remove')}]];
    var prefix = ctx + "system/deptDtoList";

    $(function() {
        var options = {
            url: prefix + "/list",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "统计分析",
            columns: [{
                title : '序号',
                align: 'center',
                formatter: function(value, row, index) {
                    return index+1;
                }
            },
                {
                    field : 'id',
                    title : 'null',
                    visible: false
                },
                {
                    field : 'deptName',
                    title : '地区名称'
                },
                {
                    field : 'articleNum',
                    title : '发稿数量'
                },
                {
                    field : 'activityNum',
                    title : '活动数量'
                },
                {
                    field : 'manuscriptNum',
                    title : '用稿数量'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });


</script>
</body>
</html>